Optimal. Leaf size=387 \[ -\frac {2 \left (40 a^3 A b-25 a A b^3-48 a^4 B+24 a^2 b^2 B+9 b^4 B\right ) \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{15 b^4 \left (a^2-b^2\right ) d \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}+\frac {2 \left (40 a^2 A b+5 A b^3-48 a^3 B-12 a b^2 B\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} F\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{15 b^4 d \sqrt {a+b \cos (c+d x)}}+\frac {2 a (A b-a B) \cos ^2(c+d x) \sin (c+d x)}{b \left (a^2-b^2\right ) d \sqrt {a+b \cos (c+d x)}}+\frac {2 \left (20 a^2 A b-5 A b^3-24 a^3 B+9 a b^2 B\right ) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{15 b^3 \left (a^2-b^2\right ) d}-\frac {2 \left (5 a A b-6 a^2 B+b^2 B\right ) \cos (c+d x) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{5 b^2 \left (a^2-b^2\right ) d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.46, antiderivative size = 387, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 8, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.242, Rules used = {3068, 3128,
3102, 2831, 2742, 2740, 2734, 2732} \begin {gather*} \frac {2 a (A b-a B) \sin (c+d x) \cos ^2(c+d x)}{b d \left (a^2-b^2\right ) \sqrt {a+b \cos (c+d x)}}-\frac {2 \left (-6 a^2 B+5 a A b+b^2 B\right ) \sin (c+d x) \cos (c+d x) \sqrt {a+b \cos (c+d x)}}{5 b^2 d \left (a^2-b^2\right )}+\frac {2 \left (-24 a^3 B+20 a^2 A b+9 a b^2 B-5 A b^3\right ) \sin (c+d x) \sqrt {a+b \cos (c+d x)}}{15 b^3 d \left (a^2-b^2\right )}+\frac {2 \left (-48 a^3 B+40 a^2 A b-12 a b^2 B+5 A b^3\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} F\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{15 b^4 d \sqrt {a+b \cos (c+d x)}}-\frac {2 \left (-48 a^4 B+40 a^3 A b+24 a^2 b^2 B-25 a A b^3+9 b^4 B\right ) \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{15 b^4 d \left (a^2-b^2\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2732
Rule 2734
Rule 2740
Rule 2742
Rule 2831
Rule 3068
Rule 3102
Rule 3128
Rubi steps
\begin {align*} \int \frac {\cos ^3(c+d x) (A+B \cos (c+d x))}{(a+b \cos (c+d x))^{3/2}} \, dx &=\frac {2 a (A b-a B) \cos ^2(c+d x) \sin (c+d x)}{b \left (a^2-b^2\right ) d \sqrt {a+b \cos (c+d x)}}-\frac {2 \int \frac {\cos (c+d x) \left (-2 a (A b-a B)+\frac {1}{2} b (A b-a B) \cos (c+d x)+\frac {1}{2} \left (5 a A b-6 a^2 B+b^2 B\right ) \cos ^2(c+d x)\right )}{\sqrt {a+b \cos (c+d x)}} \, dx}{b \left (a^2-b^2\right )}\\ &=\frac {2 a (A b-a B) \cos ^2(c+d x) \sin (c+d x)}{b \left (a^2-b^2\right ) d \sqrt {a+b \cos (c+d x)}}-\frac {2 \left (5 a A b-6 a^2 B+b^2 B\right ) \cos (c+d x) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{5 b^2 \left (a^2-b^2\right ) d}-\frac {4 \int \frac {\frac {1}{2} a \left (5 a A b-6 a^2 B+b^2 B\right )-\frac {1}{4} b \left (5 a A b-2 a^2 B-3 b^2 B\right ) \cos (c+d x)-\frac {1}{4} \left (20 a^2 A b-5 A b^3-24 a^3 B+9 a b^2 B\right ) \cos ^2(c+d x)}{\sqrt {a+b \cos (c+d x)}} \, dx}{5 b^2 \left (a^2-b^2\right )}\\ &=\frac {2 a (A b-a B) \cos ^2(c+d x) \sin (c+d x)}{b \left (a^2-b^2\right ) d \sqrt {a+b \cos (c+d x)}}+\frac {2 \left (20 a^2 A b-5 A b^3-24 a^3 B+9 a b^2 B\right ) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{15 b^3 \left (a^2-b^2\right ) d}-\frac {2 \left (5 a A b-6 a^2 B+b^2 B\right ) \cos (c+d x) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{5 b^2 \left (a^2-b^2\right ) d}-\frac {8 \int \frac {\frac {1}{8} b \left (10 a^2 A b+5 A b^3-12 a^3 B-3 a b^2 B\right )+\frac {1}{8} \left (40 a^3 A b-25 a A b^3-48 a^4 B+24 a^2 b^2 B+9 b^4 B\right ) \cos (c+d x)}{\sqrt {a+b \cos (c+d x)}} \, dx}{15 b^3 \left (a^2-b^2\right )}\\ &=\frac {2 a (A b-a B) \cos ^2(c+d x) \sin (c+d x)}{b \left (a^2-b^2\right ) d \sqrt {a+b \cos (c+d x)}}+\frac {2 \left (20 a^2 A b-5 A b^3-24 a^3 B+9 a b^2 B\right ) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{15 b^3 \left (a^2-b^2\right ) d}-\frac {2 \left (5 a A b-6 a^2 B+b^2 B\right ) \cos (c+d x) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{5 b^2 \left (a^2-b^2\right ) d}+\frac {\left (40 a^2 A b+5 A b^3-48 a^3 B-12 a b^2 B\right ) \int \frac {1}{\sqrt {a+b \cos (c+d x)}} \, dx}{15 b^4}-\frac {\left (40 a^3 A b-25 a A b^3-48 a^4 B+24 a^2 b^2 B+9 b^4 B\right ) \int \sqrt {a+b \cos (c+d x)} \, dx}{15 b^4 \left (a^2-b^2\right )}\\ &=\frac {2 a (A b-a B) \cos ^2(c+d x) \sin (c+d x)}{b \left (a^2-b^2\right ) d \sqrt {a+b \cos (c+d x)}}+\frac {2 \left (20 a^2 A b-5 A b^3-24 a^3 B+9 a b^2 B\right ) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{15 b^3 \left (a^2-b^2\right ) d}-\frac {2 \left (5 a A b-6 a^2 B+b^2 B\right ) \cos (c+d x) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{5 b^2 \left (a^2-b^2\right ) d}-\frac {\left (\left (40 a^3 A b-25 a A b^3-48 a^4 B+24 a^2 b^2 B+9 b^4 B\right ) \sqrt {a+b \cos (c+d x)}\right ) \int \sqrt {\frac {a}{a+b}+\frac {b \cos (c+d x)}{a+b}} \, dx}{15 b^4 \left (a^2-b^2\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}+\frac {\left (\left (40 a^2 A b+5 A b^3-48 a^3 B-12 a b^2 B\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}}\right ) \int \frac {1}{\sqrt {\frac {a}{a+b}+\frac {b \cos (c+d x)}{a+b}}} \, dx}{15 b^4 \sqrt {a+b \cos (c+d x)}}\\ &=-\frac {2 \left (40 a^3 A b-25 a A b^3-48 a^4 B+24 a^2 b^2 B+9 b^4 B\right ) \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{15 b^4 \left (a^2-b^2\right ) d \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}+\frac {2 \left (40 a^2 A b+5 A b^3-48 a^3 B-12 a b^2 B\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} F\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{15 b^4 d \sqrt {a+b \cos (c+d x)}}+\frac {2 a (A b-a B) \cos ^2(c+d x) \sin (c+d x)}{b \left (a^2-b^2\right ) d \sqrt {a+b \cos (c+d x)}}+\frac {2 \left (20 a^2 A b-5 A b^3-24 a^3 B+9 a b^2 B\right ) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{15 b^3 \left (a^2-b^2\right ) d}-\frac {2 \left (5 a A b-6 a^2 B+b^2 B\right ) \cos (c+d x) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{5 b^2 \left (a^2-b^2\right ) d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.92, size = 304, normalized size = 0.79 \begin {gather*} \frac {\frac {2 b^2 \left (-10 a^2 A b-5 A b^3+12 a^3 B+3 a b^2 B\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} F\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{(a-b) (a+b)}+\frac {2 \left (-40 a^3 A b+25 a A b^3+48 a^4 B-24 a^2 b^2 B-9 b^4 B\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} \left ((a+b) E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )-a F\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )\right )}{(a-b) (a+b)}+\frac {30 a^3 b (-A b+a B) \sin (c+d x)}{-a^2+b^2}+2 b (5 A b-9 a B) (a+b \cos (c+d x)) \sin (c+d x)+3 b^2 B (a+b \cos (c+d x)) \sin (2 (c+d x))}{15 b^4 d \sqrt {a+b \cos (c+d x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(1311\) vs.
\(2(423)=846\).
time = 0.74, size = 1312, normalized size = 3.39
method | result | size |
default | \(\text {Expression too large to display}\) | \(1312\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 0.35, size = 910, normalized size = 2.35 \begin {gather*} -\frac {6 \, {\left (24 \, B a^{4} b^{2} - 20 \, A a^{3} b^{3} - 9 \, B a^{2} b^{4} + 5 \, A a b^{5} - 3 \, {\left (B a^{2} b^{4} - B b^{6}\right )} \cos \left (d x + c\right )^{2} + {\left (6 \, B a^{3} b^{3} - 5 \, A a^{2} b^{4} - 6 \, B a b^{5} + 5 \, A b^{6}\right )} \cos \left (d x + c\right )\right )} \sqrt {b \cos \left (d x + c\right ) + a} \sin \left (d x + c\right ) + {\left (\sqrt {2} {\left (-96 i \, B a^{5} b + 80 i \, A a^{4} b^{2} + 84 i \, B a^{3} b^{3} - 80 i \, A a^{2} b^{4} + 27 i \, B a b^{5} - 15 i \, A b^{6}\right )} \cos \left (d x + c\right ) + \sqrt {2} {\left (-96 i \, B a^{6} + 80 i \, A a^{5} b + 84 i \, B a^{4} b^{2} - 80 i \, A a^{3} b^{3} + 27 i \, B a^{2} b^{4} - 15 i \, A a b^{5}\right )}\right )} \sqrt {b} {\rm weierstrassPInverse}\left (\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (8 \, a^{3} - 9 \, a b^{2}\right )}}{27 \, b^{3}}, \frac {3 \, b \cos \left (d x + c\right ) + 3 i \, b \sin \left (d x + c\right ) + 2 \, a}{3 \, b}\right ) + {\left (\sqrt {2} {\left (96 i \, B a^{5} b - 80 i \, A a^{4} b^{2} - 84 i \, B a^{3} b^{3} + 80 i \, A a^{2} b^{4} - 27 i \, B a b^{5} + 15 i \, A b^{6}\right )} \cos \left (d x + c\right ) + \sqrt {2} {\left (96 i \, B a^{6} - 80 i \, A a^{5} b - 84 i \, B a^{4} b^{2} + 80 i \, A a^{3} b^{3} - 27 i \, B a^{2} b^{4} + 15 i \, A a b^{5}\right )}\right )} \sqrt {b} {\rm weierstrassPInverse}\left (\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (8 \, a^{3} - 9 \, a b^{2}\right )}}{27 \, b^{3}}, \frac {3 \, b \cos \left (d x + c\right ) - 3 i \, b \sin \left (d x + c\right ) + 2 \, a}{3 \, b}\right ) - 3 \, {\left (\sqrt {2} {\left (48 i \, B a^{4} b^{2} - 40 i \, A a^{3} b^{3} - 24 i \, B a^{2} b^{4} + 25 i \, A a b^{5} - 9 i \, B b^{6}\right )} \cos \left (d x + c\right ) + \sqrt {2} {\left (48 i \, B a^{5} b - 40 i \, A a^{4} b^{2} - 24 i \, B a^{3} b^{3} + 25 i \, A a^{2} b^{4} - 9 i \, B a b^{5}\right )}\right )} \sqrt {b} {\rm weierstrassZeta}\left (\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (8 \, a^{3} - 9 \, a b^{2}\right )}}{27 \, b^{3}}, {\rm weierstrassPInverse}\left (\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (8 \, a^{3} - 9 \, a b^{2}\right )}}{27 \, b^{3}}, \frac {3 \, b \cos \left (d x + c\right ) + 3 i \, b \sin \left (d x + c\right ) + 2 \, a}{3 \, b}\right )\right ) - 3 \, {\left (\sqrt {2} {\left (-48 i \, B a^{4} b^{2} + 40 i \, A a^{3} b^{3} + 24 i \, B a^{2} b^{4} - 25 i \, A a b^{5} + 9 i \, B b^{6}\right )} \cos \left (d x + c\right ) + \sqrt {2} {\left (-48 i \, B a^{5} b + 40 i \, A a^{4} b^{2} + 24 i \, B a^{3} b^{3} - 25 i \, A a^{2} b^{4} + 9 i \, B a b^{5}\right )}\right )} \sqrt {b} {\rm weierstrassZeta}\left (\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (8 \, a^{3} - 9 \, a b^{2}\right )}}{27 \, b^{3}}, {\rm weierstrassPInverse}\left (\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (8 \, a^{3} - 9 \, a b^{2}\right )}}{27 \, b^{3}}, \frac {3 \, b \cos \left (d x + c\right ) - 3 i \, b \sin \left (d x + c\right ) + 2 \, a}{3 \, b}\right )\right )}{45 \, {\left ({\left (a^{2} b^{6} - b^{8}\right )} d \cos \left (d x + c\right ) + {\left (a^{3} b^{5} - a b^{7}\right )} d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {{\cos \left (c+d\,x\right )}^3\,\left (A+B\,\cos \left (c+d\,x\right )\right )}{{\left (a+b\,\cos \left (c+d\,x\right )\right )}^{3/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________